<?php 

if(!defined('ADMIN')){
	exit('Access Denied');
}
?>

<div class="pageHeader">
	<p class="topnam"><b>投票调查 > 详细</b></p>
</div>
<div class="pageContent">
<form method="post" action="index.php?mod=vote&act=addedisumit" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">

<div class="pageFormContent nowrap" layoutH="85" style="overFlow-x: hidden;">
<input type="hidden" name="sub" value="save" />
<input type="hidden" name="subjectid" value="<?=$subjectid?>" />
<table width="90%" border="0" style="padding: 0;margin: 0;" align="center">
  <tr>
    <td align="center" style="height: 30px;"  colspan="2"><h1 style="font-size: 16px;"><?=$row["subject"]?></h1></td>
  </tr>
  <tr>
    <td style="height: 25px;border-top:1px #CCC solid;"  colspan="2"><b>调查起止时间：</b><?=$row["fromdate"]?> 到 <?=$row["todate"]?></td>
  </tr> 
  <tr>
    <td  style="height: 25px;border-bottom:solid 1px #CCC;clear: both;" colspan="2"><?=nl2br($row["description"])?></td>
  </tr>   
<?php 
$i=1;
foreach ($itemrow as $r){?>
  <tr>
    <td colspan="2" style="font-size: 12px;font-weight: 700;height: 25px;line-height: 25px;"><?=$i?>、<?=$r["title"]?></td>
  </tr>   
  <tr>
  <td colspan="2" style="padding-bottom: 5px;">
<?foreach ($r["options"] as $r2){
    if($r["ismultiple"]==1){
      echo '<input name="vdata['.$r["id"].'][]" type="checkbox" value="'.$r2["optionid"].'">'.$r2["option"].'&nbsp;&nbsp;';  
    }elseif($r["ismultiple"]==2){
      echo '<textarea name="vdata['.$r["id"].'][]" cols="40" rows="5"></textarea>';   
      break;
    }else{
       echo '<input name="vdata['.$r["id"].'][]" type="radio" value="'.$r2["optionid"].'">'.$r2["option"].'&nbsp;&nbsp;';    
    }    
    ?>

<?}?>  
  </td>
  </tr> 


<? $i++; }?>  
</table>  

</div>     
<div class="formBar">
			<ul style="float:left;">
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
</div>
</form>
</div>  
